import request from "@/config/request";


export const titleServer = () => {
  return request.get("/get_title");
};

export const circuitServer = () => {
  return request.get("/get_all_circuit_diagram_name");
};
export const pageCircuitServer = (params) => {
  return request.get("/get_all_circuit_diagram_name", {
    params,
  });
};

export const addCircuit = (data) => {
  return request.post("/try_insert_one_circuit_diagram_name", data);
};
export const deleteCircuit = (circuitName) => {
  const objData = {
    circuit_diagram_name: circuitName,
  };
  return request({
    url: "/try_delete_one_circuit_diagram_name",
    method: "DELETE",
    data: objData,
    headers: {
      "Content-Type": "application/json", // 确保后端可以解析 JSON 数据
    },
  });
};

export const getCircuitFind = (params) => {
  return request({
    url: "/find_circuit_diagram_name",
    method: "GET",
    params: params,
    headers: {
      "Content-Type": "application/json", // 确保后端可以解析 JSON 数据
    },
  });
};
